﻿
using Chain.BLL;
using Chain.Model;
using System;
using System.Data;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

public partial class SysNoticeShow : Page
{

    private int intNoticeID;


    public void GetNoticeInfo()
    {
        if (this.intNoticeID != 0)
        {
            Chain.Model.SysNotice modelNotice = new Chain.BLL.SysNotice().GetModel(this.intNoticeID);
            this.spRelaseName.InnerHtml = modelNotice.SysNotieceName;
            this.spRelaseTime.InnerHtml = modelNotice.SysNoticeTime.ToShortDateString();
            this.spNoticeTitle.InnerHtml = modelNotice.SysNoticeTitle;
            this.ltNoticeDetail.Text = HTMLDecodeText(modelNotice.SysNoticeDetail);
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (base.Request["NoticeID"] != "")
        {
            this.intNoticeID = int.Parse(base.Request["NoticeID"]);
        }
        this.GetNoticeInfo();
    }

    public string HTMLDecodeText(string text) {
        string stringstr = "";
        if (!string.IsNullOrEmpty(text) && text != "") {

            stringstr = text.Replace("&lt;", "<");
            stringstr = text.Replace("&gt;", ">");
            stringstr = HttpContext.Current.Server.HtmlDecode(stringstr).Trim();
        }

        return stringstr;

    }
  

}


